
code each turn.)
3. ! The system generates feedback on each guess as follows:
4. ! A green color light for each code item that's the right color and in the right position.
5. ! A yellow color light for each code item that's the right color, but not in the right po"
sition. Red lights indicate a color is not used in the code.
6. ! The system does not put the lights in any particular order. It's part of the challenge
for the code breaker to figure out which lights correspond to which digit.)The codebreaker
should remember that one light corresponds to one digit and a green light takes precedence
over a yellow one.
! This is fairly simple, but there are many opportunities for expansion, arranged
roughly in the order in which we would implement them:
! •We could o&er the ability to have the game randomly choose the code.
! •Rather than a binary code, we could have leds with multiple colors for
each position. The standard arrangement is six colors (ROYGBV) in four rows. In
this scenario, we would have a button for each of the columns to cycle through the
colors, and a button to accept the input.&&
! •We could keep track of the player's last row of input and display it for the
next guess by default, because they will often want to keep many entries the same.
! •Our original design includes only one row of leds for input, we could used an led
matrix or vga display to show multiple rows of guesses $and the results of each%.
! •We could add more than two players #)one player sets the initial code, others take
turns guessing.))
! •We could keep track of the score over multiple games $a sane scoring method might
be to award the person who chose the code points equal to the number of guesses taken to
solve it%.))
! •We could create an ai opponent, using a guessing algorithm with various levels of
di'culty #)culminating in an opponent who can guess the code quite quickly $I suspect it is
possible to always solve the game within 8 guesses%.
! •We could read and write high scores to persistent memory.
! •If we used an led matrix or vga display, we could display a short introductory anima"
tion with instructions when the game started, and game over/ whose turn is it/high score
messages.
! •Now that we have many choices for the user $how many players, ai or not, how di'"
cult an ai setting, perhaps how many colors to use%, we could display a textual user interface
with options to go back and change options, and a button for returning to the main menu
during a game $with confirmation%.”
! Although we did not implement some of the flashier features suggested in the pro"
ject proposal, we constructed a base game which is very playable. The final system consists
of six buttons for setting colors, resetting the game, and submitting guesses # and an LED
13